/*     */ package com.jcrj.action.log;
/*     */ 
/*     */ import com.jcrj.action.BaseAction;
/*     */ import com.jcrj.entity.OSysLog;
/*     */ import com.jcrj.service.SysLogService;
/*     */ import java.io.IOException;
/*     */ import java.io.PrintWriter;
/*     */ import java.util.List;
/*     */ import javax.servlet.http.HttpServletResponse;
/*     */ 
/*     */ public class SysLogAction extends BaseAction
/*     */ {
/*     */   private List<OSysLog> logList;
/*     */   private SysLogService sysLogService;
/*     */   private String name;
/*     */   private long totalCount;
/*     */   private long pageCount;
/*     */   private String module;
/*     */   private String[] ids;
/*     */ 
/*     */   public String sysLogManager()
/*     */   {
/*  22 */     this.totalCount = this.sysLogService.countSysLog(this.name, this.module, super.getStartDate(), super.getEndDate()).longValue();
/*  23 */     this.pageCount = ((this.totalCount - 1L) / 10L + 1L);
/*  24 */     if (super.getCurrentPage() > this.pageCount) {
/*  25 */       super.setCurrentPage(Long.valueOf(this.pageCount).intValue());
/*     */     }
/*  27 */     this.logList = this.sysLogService
/*  28 */       .LogListManager(this.name, this.module, super.getStartDate(), super.getEndDate(), 
/*  28 */       super.getCurrentPage());
/*  29 */     return "success";
/*     */   }
/*     */ 
/*     */   public String deleteSysLogs() {
/*     */     try {
/*  34 */       this.sysLogService.deleteSysLogs(this.ids);
/*  35 */       super.getResponse().getWriter().write("success");
/*  36 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/*  38 */       e.printStackTrace();
/*     */       try
/*     */       {
/*  41 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/*  43 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/*  41 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/*  43 */         e.printStackTrace();
/*     */       }
/*     */     }
/*  46 */     return null;
/*     */   }
/*     */ 
/*     */   public String clearSysLogs() {
/*     */     try {
/*  51 */       this.sysLogService.deleteAllSysLogs(this.name, this.module, super.getStartDate(), super.getEndDate());
/*  52 */       super.getResponse().getWriter().write("success");
/*  53 */       super.getResponse().getWriter().flush();
/*     */     } catch (Exception e) {
/*  55 */       e.printStackTrace();
/*     */       try
/*     */       {
/*  58 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e1) {
/*  60 */         e1.printStackTrace();
/*     */       }
/*     */     }
/*     */     finally
/*     */     {
/*     */       try
/*     */       {
/*  58 */         super.getResponse().getWriter().close();
/*     */       } catch (IOException e) {
/*  60 */         e.printStackTrace();
/*     */       }
/*     */     }
/*  63 */     return null;
/*     */   }
/*     */ 
/*     */   public String[] getIds()
/*     */   {
/*  68 */     return this.ids;
/*     */   }
/*     */ 
/*     */   public void setIds(String[] ids) {
/*  72 */     this.ids = ids;
/*     */   }
/*     */ 
/*     */   public String getModule() {
/*  76 */     return this.module;
/*     */   }
/*     */ 
/*     */   public void setModule(String module) {
/*  80 */     this.module = module;
/*     */   }
/*     */ 
/*     */   public long getTotalCount() {
/*  84 */     return this.totalCount;
/*     */   }
/*     */ 
/*     */   public void setTotalCount(long totalCount) {
/*  88 */     this.totalCount = totalCount;
/*     */   }
/*     */ 
/*     */   public long getPageCount() {
/*  92 */     return this.pageCount;
/*     */   }
/*     */ 
/*     */   public void setPageCount(long pageCount) {
/*  96 */     this.pageCount = pageCount;
/*     */   }
/*     */ 
/*     */   public List<OSysLog> getLogList() {
/* 100 */     return this.logList;
/*     */   }
/*     */ 
/*     */   public void setLogList(List<OSysLog> logList) {
/* 104 */     this.logList = logList;
/*     */   }
/*     */ 
/*     */   public SysLogService getSysLogService() {
/* 108 */     return this.sysLogService;
/*     */   }
/*     */ 
/*     */   public void setSysLogService(SysLogService sysLogService) {
/* 112 */     this.sysLogService = sysLogService;
/*     */   }
/*     */ 
/*     */   public String getName() {
/* 116 */     return this.name;
/*     */   }
/*     */ 
/*     */   public void setName(String name) {
/* 120 */     this.name = name;
/*     */   }
/*     */ }

/* Location:           /Volumes/work/oa/WEB-INF/classes/
 * Qualified Name:     com.jcrj.action.log.SysLogAction
 * JD-Core Version:    0.6.0
 */